How to Print Multiple Sheets in Excel: 6 Suitable Examples |
您所在的位置:网站首页 › print multiple postcards on a single sheet in › How to Print Multiple Sheets in Excel: 6 Suitable Examples |
Example 1 – Print All Sheets at Once in Excel
Case 1.1 – Using the Print Entire Workbook Feature for Printing All Sheets at Once
Go to the File tab on the ribbon or press CTRL+P. This will take us to the main menu.
VBA Code: Sub Print_Workbooks() ActiveWorkbook.PrintOut End Sub Case 1.3 – Converting the Excel File into a PDF File with VBA Code to Print All Sheets Go to the Developer tab >> Visual Basic >> Insert >> Module. Copy and paste the VBA code that is shown below.VBA Code: Sub PrintAllSheetToPdf() For Each iSheet In ActiveWorkbook.Worksheets Worksheets(iSheet.Name).Select False Next iSheet With Application.FileDialog(msoFileDialogFolderPicker) .Show iFolder = .SelectedItems(1) & "\" End With iFile = InputBox("Enter New File Name", "PDF File Name") ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=iFolder & iFile, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True End Sub Press F5 on your keyboard. You will be asked to select the folder where you want to save the PDF file. Select the new file path and click OK.VBA Code: Sub Print_Certain_Sheets() Worksheets(Array("Apparel-1", "Grocery")).PrintOut End SubApparel-1, and Grocery are the name of the sheets. Run the code by clicking the RUN button. In the end, running the code will print multiple sheets (Apparel-1, and Grocery) at one click. Example 2 – Print Multiple Active SheetsWe have five sheets of data but there are only three active sheets we want to print. To select more than one sheet at a time, hold down the Ctrl key then select the sheet names one by one.VBA Code: Sub Print_ActiveSheets() ActiveSheet.PrintOut End Sub Run the code by pressing the F5 key. This will print all the active sheets on the spreadsheet. Case 2.3 – Using the SelectedSheets Property to Print Selected Excel Sheets Click the Developer tab >> go to Visual Basic >> from the drop-down menu under Insert, go to Module >> insert the following VBA code.VBA Code: Sub Print_SelectedSheets() ActiveWindow.SelectedSheets.PrintOut End Sub Run the code by pressing F5 to get the printed copies of selected sheets. Example 3 – Print Multiple Sheets with a Specific Print Area Case 3.1 – Manually Adjusting the Print Area for Different Sheets Go to the first worksheet >> select the particular area for printing >> go to the Page Layout tab >> click on the Print Area drop-down menu under the Page Setup group >> click on the Set Print Area.You will see the Camera feature under New Tab in the top ribbon. Go to a sheet >> select the area that you want to print >> go to New Tab >> click Camera.Finally, you will get all the important parts on one single page. We’ll print this sheet with the comment. VBA Code: Sub Print_with_Comnts() Application.DisplayCommentIndicator = xlCommentAndIndicator With ActiveSheet .PageSetup.PrintComments = xlPrintSheetEnd .PrintOut End With End Sub After running the code, you will find the comment at the end of the sheet.We hid a few sheets. VBA Code: Sub Print_Hidden_sheets() Dim Vis As Long Dim sheets As Worksheet For Each sheets In ActiveWorkbook.Worksheets With sheets Vis = .Visible .Visible = xlSheetVisible .PrintOut .Visible = Vis End With Next sheets End Sub After running the code, you will get all sheets printed, including the hidden ones.You will get the row and column index in that printed sheet. How to print an Excel sheet in A4 size full page? From Page Layout, go to the Drop-Down Arrow in the Page Setup group. In the Paper Size box, select A4, then press OK. How to print an Excel sheet on a full page? From Page Layout, go to the Drop-Down Arrow beside the Page Setup group. From the Scaling section, check Fit to box and write 1 in page wide by and 1 in tall, then press OK. Download the Practice Workbook Printing Multiple Sheets.xlsm
Sabrina Ayon, a Computer Science and Engineering graduate from United International University, has been an integral part of the ExcelDemy project for two years. She authored 150+ articles, excelling in instructing through visually engaging Excel tutorials. With a passion for teaching, Sabrina conducted sessions on Excel VBA, sharing her knowledge and insights with others. Currently holding the position of Project Manager for the ExcelDemy Visual Development Project, she oversees various aspects of the project, ensuring its smooth operation... Read Full Bio We will be happy to hear your thoughts Leave a reply Cancel reply |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |